<template>
  <n-tooltip>
    <template #trigger>
      <n-button text @click="emits('clickEvent')">
        <icon :icon="icon" class="text-22 text-#666 hover:text-primary" />
      </n-button>
    </template>
    {{ tip }}
  </n-tooltip>
</template>

<script lang="ts" setup>
import { Icon } from '@iconify/vue';

interface Props {
  icon: string;
  tip: string;
  onClickEvent: Function;
}
interface Emits {
  (e: "clickEvent"): void;
}
defineProps<Props>();
const emits = defineEmits<Emits>();
</script>
